package com.svse.designPattern.behaviour.chainofresponsibility.impl;


import com.svse.designPattern.behaviour.chainofresponsibility.service.Handler;

/**
 * @author LiYuhang
 * @version 0.1
 * @application
 * @Date 2020/8/8 10:45
 */
public class ConcreteHandler1 extends Handler {
    @Override
    public void handleRequest(String request) {
        if("one".equals(request)){
            System.out.println("具体处理者1负责处理该请求！");
        } else {
            if(getNext()!=null){
                getNext().handleRequest(request);
            }else{
                System.out.println("没有人处理该请求！");
            }
        }
    }
}
